<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/view/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo">      	
  	  <link rel="stylesheet" type="text/css" href="./estilos.css"/>
  	  
<h:form id="formSelecionaAluno">  
	<p:panel id="panelSelecionaAluno" style="margin-bottom:20px; ">  
	<f:facet name="header">
		<h:outputText value="Selecionar Aluno" styleClass="outputTextTitulo"/>
	</f:facet>
 	<p:messages id="messagesManterAvFisica" autoUpdate="true" closable="true"/> 
 		<h:panelGrid id="pgManterAvFisicaProfessor" columns="3" style="text-align:center; margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Funcionario" styleClass="outputLabel"/> 
            <h:outputLabel  />           
            <p:inputText id="inputAFFuncionarioNome" value="#{avaliacaoFisicaBean.avaliacaoFisica.funcionario.idFuncionario}" maxlength="5" styleClass="inputId">
            	<p:ajax  listener="#{avaliacaoFisicaBean.onChangeFuncionario}" update="pgManterAvFisicaProfessor" />  
            </p:inputText>
  			<p:inputText  value="#{avaliacaoFisicaBean.avaliacaoFisica.funcionario.nome}" maxlength="40" styleClass="inputDescricao">
  				<p:ajax listener="#{avaliacaoFisicaBean.onChangeFuncionarioNull}" update="pgManterAvFisicaAluno"/>
			</p:inputText>
			<p:commandButton icon="ui-icon-search" action="#{avaliacaoFisicaBean.openDialogProfessor}" immediate="true"/> 
        </h:panelGrid> 
        <h:panelGrid id="pgManterAvFisicaAluno" columns="3" style="text-align:center; margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Aluno" styleClass="outputLabel"/> 
            <h:outputLabel  />
            <p:inputText value="#{avaliacaoFisicaBean.avaliacaoFisica.aluno.idAluno}" maxlength="5" styleClass="inputId" >
            	<p:ajax  listener="#{avaliacaoFisicaBean.onChangeAluno}" update="pgManterAvFisicaAluno" />
            </p:inputText>  
  			<p:inputText  value="#{avaliacaoFisicaBean.avaliacaoFisica.aluno.nome}" maxlength="40" styleClass="inputDescricao"  >
  				<p:ajax listener="#{avaliacaoFisicaBean.onChangeAlunoNull}" update="pgManterAvFisicaAluno"/>
  			</p:inputText>
			<p:commandButton icon="ui-icon-search" action="#{avaliacaoFisicaBean.openDialogConsultarAluno}" immediate="true"/>
        </h:panelGrid>  
    <p:commandButton value="OK" action="#{avaliacaoFisicaBean.newAvaliacaoFisica}" 
    					update="messagesManterAvFisica" style="width:80px" /> 
	<p:commandButton value="Cancelar" action="#{avaliacaoFisicaBean.consultarAvaliacaoFisica}" immediate="true" style="margin-right:20px;" /> 
	</p:panel>  
</h:form>  
<ui:include src="/view/avaliacaoFisica/dialogConsultarAluno.xhtml"></ui:include>
<ui:include src="/view/avaliacaoFisica/dialogProfessor.xhtml"></ui:include>
</ui:define>
</ui:composition>
